#include "quesion53.h"
#include "limits.h"

int quesion53::maxSubArray(vector<int>& nums)
{
    int maxsub=INT_MIN;
    for(int i=0;i<nums.size();i++){
        int n=0;
        for(int j=i;j<nums.size();j++){
            n+=nums[j];
            if(n>maxsub){
                maxsub=n;
            }
        }
    }
    return maxsub;
}
